import request from "@/utils/request.js";

// 岗位列表
export function getPositionInfoList(data) {
  return request({
    url: "/xcx/zp/position/getPositionInfoList",
    method: "get",
    data,
  });
}
// 修改状态 （暂停、启用）
export function exitState(data) {
  return request({
    url: "/xcx/zp/position/exitState",
    method: "put",
    data,
  });
}
// 获取岗位详情
export function getPositionDetails(positionId) {
  return request({
    url: "/xcx/zp/position/getPositionDetails/" + positionId,

    method: "get",
  });
}
// 添加岗位
export function addPosition(data) {
  return request({
    url: "/xcx/zp/position/add",
    method: "post",
    data,
  });
}

// 修改岗位信息
export function editPosition(data) {
  return request({
    url: "/xcx/zp/position/edit",
    method: "put",
    data,
  });
}

//修改兼职、全职申请状态 注：支持批量修改
export function exitRecruitsPosition(data) {
  return request({
    url: "/xcx/zp/position/exitRecruits",
    method: "post",
    data,
  });
}

// 修改零工申请状态 支持批量修改 注：支付
export function exitRecruitsPayPosition(data) {
  return request({
    url: "/xcx/zp/position/exitRecruitsPay",
    method: "post",
    data,
  });
}

// 查看申请 -顶部岗位信息
export function getRecruitInfo(id) {
  return request({
    url: "/xcx/zp/position/getRecruitInfo/" + id,
    method: "get",
  });
}

// 查看申请 -申请记录
export function getJobSeekerLogInfo(data) {
  return request({
    url: "/xcx/zp/position/getJobSeekerLogInfo",
    method: "get",
    data,
  });
}

// 立即评价
export function evaluate(data) {
  return request({
    url: "/xcx/zp/position/evaluate",
    method: "put",
    data,
  });
}
// 查看评价
export function getScoreInfo(seekerLogId) {
  return request({
    url: "/xcx/zp/position/getScoreInfo/"+seekerLogId,
    method: "put"
  });
}

// 创建零工录用预支付订单
export function creationOrder(data) {
  return request({
    url: "/xcx/zp/position/creationOrder",
    method: "post",
    data,
  });
}
// 支付回调
export function xcxNotify(data) {
  return request({
    url: "/xcx/zp/position/xcxNotify",
    method: "post",
    data,
  });
}
// 查询零工录订单支付结果（支付成功修改状态）
export function transactions(data) {
  return request({
    url: "/xcx/zp/position/transactions",
    method: "post",
    data,
  });
}